import { mapGetters } from 'vuex'

export default {
  computed: {
    ...mapGetters('user', ['isAuthenticated', 'currentUser'])
  },
  methods: {
    checkAuth() {
      if (!this.isAuthenticated) {
        this.$router.push('/login')
        return false
      }
      return true
    }
  }
}